<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopAdminTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_admin', function (Blueprint $table) {
            $table->increments('id')->comment('管理员ID');
            $table->string('admin_name', 20)->comment('用户名'); 
            $table->char('password', 32)->comment('密码');
            $table->dateTime('create_time')->comment('创建时间');
            $table->string('email',50)->comment('邮箱');
            $table->dateTime('last_time')->comment('最后一次登录时间');
            $table->tinyInteger('is_freeze')->defalut('0')->comment('0为冻结 1为正常');
            $table->charset = 'utf8';
            $table->collation = 'utf8_bin';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_admin');
    }
}
